The solution according to one or more embodiments of the present invention relates to the data processing field. More specifically, this solution relates to distributed software applications.
Distributed software applications (or simply distributed applications), wherein a server computing machine (or simply server) offers a service that may be exploited by a large number of users accessing the server with their client computing machines (or simply clients), are commonplace in modern data-processing systems, especially in the Internet. A typical example is a web application, which exposes a web interface based on web pages that are downloaded within a web browser of the clients. The interaction with the web application involves the submission of requests to the server by selecting corresponding commands of a current web page; the server processes each request, and returns a corresponding response (typically involving the downloading of a new web page, or a part thereof). The web applications have become very popular in the recent years, especially thanks to the ubiquity of the web browsers (only required to access them) and to their simplified management (typically not requiring any action on the clients).
In modern web applications, each web page may comprise client processing components (for example, based on the JavaScript technology), each one associated with a command of the web page for its execution on the client in response to the selection of the command—for example, as described in “Partitioning Web Applications Between The Server And The Client, Janne Kuuskeri, Tommi Mikkonen, SAC '09 Proceedings of the 2009 ACM symposium on Applied Computing”, in U.S. Pat. No. 8,112,473 and in U.S. Pat. No. 8,190,703 (the entire disclosures of which are herein incorporated by reference). As a result, part of a processing logic required to serve each request is moved to the clients, wherein its may be executed without requiring any interaction with the server. This improves the performance of the server, and reduces the network traffic (between the clients and the server).
However, the more and more processing logic that is moved to the clients may cause an overload thereof with a detrimental effect on their performance. This is particularly acute in clients with limited computational capability (for example, entry level smart-phones).
This problem is not solved by the fact that very often the web applications have ad-hoc web interfaces that are customized for specific clients (such as of the mobile type); these web interfaces may also be generated dynamically on the clients by a browser server updating general-purpose web interfaces according to web interface data received from the server, as described in US-A-2012/0137311 (the entire disclosure of which is herein incorporated by reference). The above-mentioned web interfaces are optimized for the common features of the corresponding clients (for example, touch screens of small size), and generally provide a reduced set of functionalities. However, in this case as well the same client processing components associated with each web page are to be executed on all the clients that download it (with the same drawbacks pointed out above).
On the other hand, each server may become overloaded (for example, when too many clients access it). In this case, the performance of the server degrades with a detrimental effect on the level of quality of the provided services. In order to tackle this problem, load-balancing techniques are commonly used. In this case, the same web application is replicated onto a plurality of servers, which are grouped into a cluster exposing a single access point to the clients. The different requests from the clients are then distributed across the servers of the cluster (in a way completely transparent to the clients); for example, the requests may be distributed to the servers with a round-robin policy, according to their current workload, or with more complex policies—for example, as described in U.S. Pat. No. 6,578,068 (the entire disclosure of which is herein incorporated by reference). In this way, it is possible to optimize the usage of the servers of the cluster. Alternatively, as described in US-A-20100268764 (the entire disclosure of which is herein incorporated by reference), a client-side JavaScript logic may be used to change an address pointing to the server (so as to use the one that is best suited to serve the requests of the client).
However, in this case as well the cluster may become overloaded (with the same drawbacks pointed out above).
In both cases, the servers are generally to be over-dimensioned so as to ensure the required performance under peak conditions of their workload. However, this involves a waste of computational resources in normal situations.
Techniques for balancing the workload among the server and the clients have also been proposed in completely different architectures.
For example, U.S. Pat. No. 8,250,182 (the entire disclosure of which is herein incorporated by reference) relates to a server that hosts virtual machines for the clients; in this case, the server negotiates (with each client) the operations that are executed on the server and on the client according to capacity information of the client (possible taking into account the current workload of the server as well), with this operation that may be performed either statically (when the client requests to connect to the server) or dynamically (in response to a re-balancing request). However, this architecture requires that the client should be specifically configured for accessing the virtual machines of the server.
Moreover, US-A-20030014478 (the entire disclosure of which is herein incorporated by reference) relates to a distributed web browser wherein its functions (for accessing a web server) are split between a web browser client (running on a client) and a web browser server (running on a proxy server); the location at which parsing, layout and rendering processes of the web pages are performed is changed (either statically or dynamically) according to the workload of one or both of the client and the proxy server. However, this technique is not applicable to standard web applications.
In both cases, the above-described techniques are quite intrusive, since they require acting heavily on the clients to change their operation.